from django.template import Library
from operate.models import Collect

register = Library()


@register.filter
def has_collected(anime, user):
    c = Collect.objects.filter(anime=anime, user=user).first()
    return True if c else False